function loadUpdate(){
	var id = localtion.search.split("=")[1];
	$(function(){
		$.ajax({
			url:path + "/emp/findByIdEmp.do",
			type:"post",
			data:{"id":id},
			dateType:"json",
			success:function(result){
				if(result==0){
					var id=result.data.id;
					var name=result.data.name;
					var salary=result.data.salary;
					var age=result.data.age;
					$("#id").html(id);
					$("#name").html(name);
					$("salary").html(salary);
					$("age").html(age);
					var age=result.data.age;
				}else if(result.status == 1){
					alter(result.msg);
				}
				
			},
			error:function(){
				alert("查询失败");
			}
		})
	})
	}
function updateEmp(){
	var id=$("#id").val();
	var name=$("#name").val();
	var salary=$("salary").val();
	var age=$("age").val();
	$.ajax({
		url:path + "/emp/updateEmp.do",
		type:"post",
		data:{"id":id,"name":name,"salary":salary,"age":age},
		dateType:"json",
		success:function(result){
			if(result.status==1){
				alert("修改成功");
			}else{
				window.location.herf="emplist.html"
			}
			
			
			
		},
		error:function(){
			alert("修改失败");
		}
	})
	
}
